package com.quanyan.authority.service;


import com.quanyan.api.APIResponse;
import com.quanyan.authority.model.db.TbRole;
import com.quanyan.authority.model.request.ReqRole;
import com.quanyan.authority.service.base.IService;
import com.quanyan.comment.reqeust.ReqRoleParams;
import com.quanyan.comment.response.RespAuthority;
import com.quanyan.comment.response.RespSystemRole;

import java.util.List;


/**
 * Created by jian.zhou on 2016/5/26.
 */
public interface RoleService extends IService<ReqRole,TbRole>{

    public void initRole();

    /**
     * 根据系统编码获取系统角色
     * @param systemCode
     * @return
     */
    public APIResponse<List<RespSystemRole>> getRoleBySystemCode(String systemCode) ;

    /**
     * 根据角色编码获取权限
     * @param roleCode
     * @return
     */
    public APIResponse<List<RespAuthority>> getAuthorityByRoleCode(String roleCode);


    /**
     * 根据角色编码，角色id,url判断有无权限
     * @param reqRoleParams
     * @return
     */
    public APIResponse<Boolean> isAuthorityByRole(ReqRoleParams reqRoleParams) ;
}
